class Fruit:
    def __init__(self,name,color,price=10):
        self.name=name
        self.color=color
        self.price=price

    def __str__(self):
        return f'这个水果是{self.name} 颜色是{self.color} 价格是{self.price}'
apple=Fruit(name='苹果',color='红色',price=5)
apple.price=3

print(apple.price)
print(apple)

orange=Fruit(name='橘子',color='橙色',price=100)

print(orange)

